package design.ChainOfResponsibility;

/**
 * Created by looper on 2017/8/21.
 */
public class ChainOfResponsibilityTest {
  public static void main(String[] args) {
    ConcreteHandler h1 = new ConcreteHandler("接收者1");
    ConcreteHandler h2 = new ConcreteHandler("接收者2");
    ConcreteHandler h3 = new ConcreteHandler("接收者3");

    h1.setHandler(h2);
    h2.setHandler(h3);

    h1.operator();
  }
}
